#ifndef _SYMTABLE_INTERFACE_
#define _SYMTABLE_INTERFACE_

#include "Element.h"

/**
* Interface of the symtable
*/
class SymtableInterface {
public:
	/**
	* Destructor as virtual declared to guarentee that the destructor from the derived class will be called, too
	*/
	virtual ~SymtableInterface() {
	}

	/**
	*	Insert lexems. For duplicates must be checked before! For example with the lookup method.
	*	Lexem length will be delivered that it can be early found out if the lexem will fit in
	*	the char-Array
	*
	*	\param lexem		Pointer to the lexem which should be inserted in the hashtable
	*	\param lexemLength	Length of the lexem
	*	\param tokenTyp		TokenTyp as int
	*
	*	\return Pointer to Element
	*/
	virtual Element* insert(char* lexem, int lexemLength, int tokenTyp) = 0;

	/**
	*	Lookup for lexem to find out if it is already inserted or get the Element for the searched lexem.
	*
	*	\param lexem		Pointer to the lexem
	*	\param lexemLength	Length of the lexem
	*
	*	\return pointer to the element with the lexem which is searched
	*/
	virtual Element* lookup(char* lexem, int lexemLength) = 0;

	/**
	* Print out Symtable on console
	*/
	virtual void printSymtable() = 0;
	/**
	* Returns the length of one string tab array
	*/
	virtual int getStringTabLength() = 0;
	/**
	* Returns the current count of string tabs - 1
	*/
	virtual int getCurrentIndex() = 0;
	/**
	* Returns the string tab array
	*/
	virtual char** getStringTabArray() = 0;
	/**
	* Returns the count of chars in the symtable
	*/
	virtual int getCharCount() = 0;
};

#endif // _SYMTABLE_INTERFACE_
